// MobilePong.h
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <UIKit/UITransitionView.h>
#import "UIKit/UITextView.h"
#import "UIKit/UISegmentedControl.h"
#import "UIKit/UIPreferencesTable.h"
#import "UIKit/UISwitchControl.h"
#import "UIKit/UIPreferencesTableCell.h"
#import "UIKit/UIPreferencesTextTableCell.h"
#import "UIKit/UIKeyboard.h"
#import "ShellKeyboard.h"
#import "Common.h"

@class PongGameView;
@class UIWindow;
@class PongFieldController;
@class PongAudio;
@class PongPrefsView;
@class PongPrefs;

@interface PongMainView : UIView {
	PongFieldController *fieldController;
	PongAudio *audio;
	
	UINavigationBar		*_navBar;
	UITransitionView	*_transitionView;
	// UITextLabel			*navtitle;
		
	PongGameView *_gameView;
	PongPrefsView *_prefsView;
	
	BOOL inGameView;
	BOOL inPrefsView;
	
	BOOL isServerErr;
	BOOL isClientErr;
	
	NSTimer *timer;
	float animInterval;
}

- (void)heartbeatCallback:(NSTimer*)theTimer;

-(void)beginNewGame;
-(void)gameDidEnd;

- (void)deviceOrientationChanged:(struct __GSEvent *)fp8;

- (void)populatePreferences;
- (void)savePreferences;

//FieldController delegate Methods
-(void)serverControllerDidBork:(NSException *)e;
-(void)clientControllerDidBork:(NSException *)e;
-(void)clientControllerIsConnecting;
-(void)clientControllerFinishedConnecting;
@end
